#pragma once


enum EPickMode
{
	PICK_NONE = 0,
	PICK_CAMERA = 1,
	PICK_ROOT = 2,
};

#define WM_PICKED_NODE (WM_USER + 100)
#define WM_PICKED_ENTER (WM_PICKED_NODE + 1)
#define WM_PICKED_EXIT  (WM_PICKED_NODE + 2)

class PickMode : public PickModeCallback, public PickNodeCallback 
{
public:
	HWND m_hCurPanel;
	EPickMode m_ePickMode;
	PickMode() :m_ePickMode(PICK_NONE) { }
	void SetPanel(HWND hPanel)			{	m_hCurPanel = hPanel; }
	void SetPickMode(EPickMode epm)		{	m_ePickMode = epm; }
	void Reset() { m_hCurPanel = NULL; m_ePickMode = PICK_NONE;}
	static PickMode& get();
public:
	BOOL IsCameraNode(INode* iNode);
	//BOOL AllowMultiSelect() {return TRUE;}
	BOOL HitTest(IObjParam *ip,HWND hWnd,ViewExp *vpt,IPoint2 m,int flags);				
	BOOL Pick(IObjParam *ip,ViewExp *vpt);
	void EnterMode(IObjParam *ip);
	void ExitMode(IObjParam *ip);		

	BOOL Filter(INode *node);
	BOOL RightClick(IObjParam *ip,ViewExp *vpt) {return TRUE;}
	PickNodeCallback *GetFilter() {return this;}
};
